package easybooking.data;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 * Implementation of the Interface <code>Seat</code>.
 * @see Seat
 * @author Hakan Keles
 */
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.4892453C-3624-69EA-AAB8-CCD3D5275004]
// </editor-fold> 
public class SeatImpl extends UnicastRemoteObject implements Seat {

    /**
     * The ID of the seat.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0001AA06-F224-D41D-8428-1D00A4820799]
    // </editor-fold> 
    private int seatId = 0;
    /**
     * The row the seat.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.48EDB30C-8040-E660-11F3-7432E5CE5631]
    // </editor-fold> 
    private int row = 0;
    /**
     * The seat of a customer.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.B94158B4-8D1C-9F97-487F-D533CD41AB46]
    // </editor-fold> 
    private char seat = ' ';
    /**
     * The status of the seat.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2FD9541D-2012-F5BF-ED7C-5AD9E3C3FC03]
    // </editor-fold> 
    private boolean isActive = true;
    /**
     * Association to the plane, which contains the seats.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.42F3C5CB-E8EC-CA36-5893-203E47EC5CA2]
    // </editor-fold> 
    private int planeId = 0;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C54C6126-7E7B-9F8C-8421-7A7CE472B6FD]
    // </editor-fold> 
    public SeatImpl() throws RemoteException {
    }

    /**
     * Read-out the ID of the seat.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1484FDA9-6B57-47A0-9DFA-AB3D08B1A0C1]
    // </editor-fold> 
    public int getSeatId() throws RemoteException {
        return this.seatId;
    }

    /**
     * Read-out the row of a seat.
     * @return number of rows
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7222D106-0360-5060-B6FB-E08872CAAEE8]
    // </editor-fold> 
    public int getRow() throws RemoteException {
        return this.row;
    }

    /**
     * Read-out the seat of a customer.
     * @return The seat
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.9D51139A-FD32-B75A-F977-FAC223ABF8E7]
    // </editor-fold> 
    public char getSeat() throws RemoteException {
        return this.seat;
    }

    /**
     * Read-out the status of the seat.
     * @return status
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.07192B63-0427-F9D9-BFE3-03FA81167BAF]
    // </editor-fold> 
    public boolean getIsActive() throws RemoteException {
        return this.isActive;
    }

    /**
     * Read-out the ID of the plain, which contains the seats.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E1267789-11F7-3486-FCC1-BB6F5ECA3E6E]
    // </editor-fold> 
    public int getPlaneId() throws RemoteException {
        return this.planeId;
    }

    /**
     * Set the ID of the seat.
     * @param seatId The id of the seat.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E7906746-7429-BFA9-3C06-5EC48D2AFB63]
    // </editor-fold> 
    public void setSeatId(int seatId) throws RemoteException {
        this.seatId = seatId;
    }

    /**
     * Set the row a seat.
     * @param row The number of rows.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4E30D99C-034E-711F-B499-20A7A791DE21]
    // </editor-fold> 
    public void setRow(int row) throws RemoteException {
        this.row = row;
    }

    /**
     * Set the seat of a customer.
     * @param seat The setted seat.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0EF95773-C0FC-7052-D297-5D03D00B6803]
    // </editor-fold> 
    public void setSeat(char seat) throws RemoteException {
        this.seat = seat;
    }

    /**
     * Set the status of the seat.
     * @param status The status of the seat.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.056EEF8F-1D97-458E-69A2-3A220A6AAE95]
    // </editor-fold> 
    public void setIsActive(boolean status) throws RemoteException {
        this.isActive = status;
    }

    /**
     * Set the ID of the associated plane.
     * @param planeId The ID of the plane.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.246C2676-9E0C-C767-8D2E-42E036C687E9]
    // </editor-fold> 
    public void setPlaneId(int planeId) throws RemoteException {
        this.planeId = planeId;
    }
//    public void setSeat(String seat) throws java.rmi.RemoteException {
//        this.seat = seat;
//    };
}

